#include <iostream>
#include "gtest/gtest.h"

#include "TimeDate.h"

TEST( TimeDate, ConstructFromInts )
{
  AirlineRes::TimeDate t1( 2000, 3, 10 );
  EXPECT_EQ( 2000, t1.GetYear()   );
  EXPECT_EQ( 3,    t1.GetMonth()  );
  EXPECT_EQ( 10,   t1.GetDay()    );
  EXPECT_EQ( 0,    t1.GetHour()   );
  EXPECT_EQ( 0,    t1.GetMinute() );

  AirlineRes::TimeDate t2( 2001, 4, 20, 1, 2 );
  EXPECT_EQ( 2001, t2.GetYear()   );
  EXPECT_EQ( 4,    t2.GetMonth()  );
  EXPECT_EQ( 20,   t2.GetDay()    );
  EXPECT_EQ( 1,    t2.GetHour()   );
  EXPECT_EQ( 2,    t2.GetMinute() );
}

int main(int argc, char **argv) {
  ::testing::InitGoogleTest(&argc, argv);
  int ret = RUN_ALL_TESTS();
  std::cout << "\nPress ENTER to exit.\n";
  std::cin.get();
  return ret;
}

